home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 2).iso
/
0746
/
integr.txt
< prev
next >
Wrap
Text File
|
1997-04-09
|
13KB
|
339 lines
Specifications for DocView Integration with external databases.
(Informatik Inc. has available several utilities for special requirements,
such as direct printing, scanning, batch conversions, etc. If you are looking
for special functions that are not included in DocView, pleasse contact
Informatik Inc.)
The following setup is required to integrate the external database with DocView:
An earlier version of DocView required a SETUP.SSU file. This file has now
been replaced by the Docview.ini file. The setup is done via the Setup menu.
Images can be viewed via the DocView program by a DOCVIEW.EXE FILENAME.XXX command
(where FILENAME.XXX is the path name of the image file. DocView can also
be launched from many Windows applications, such as internet browsers.
The recommended interface is with DDE (Dynamic Data Interchange). If your
database application does not support DDE, the interface can be accomplished
with the SendKeys method. For details on the SendKeys method, please read the
section below.
USING THE DDE METHOD - THE RECOMMENDED METHOD
**********************************************
Example of a SETUP (for MSACCESS 2.0 DATABASE)
--------------------------------------------------------
Database Editing Sub-System:
DDE Topic:
MSAccess|EditForm
DDE Item:
TheField
SendKeys String:
====leave this line blank----
Database Query Sub-System:
DDE Topic:
MSAccess|QueryForm
DDE Item:
TheField
SendKeys String:
====leave this line blank====
Optional Fixed Path:
D:\DOCS
Image Windows Width:
60
Image Windows Height:
60
Image Windows State/Position:
0
Items 1-3 contain information about the external database's EDITING subsystem:
Item 1 is the DDE TOPIC (in the MS Access database system).
Item 2 is DDE ITEM (in the MS Access database system).
Item 3 (leave this line blank)
Items 4-6 contain information about the external database's QUERY subsystem:
Item 4 is the DDE TOPIC (in the MS Access database system).
Item 5 is DDE ITEM (in the MS Access database system).
Iteme 6 (leave this line blank)
Item 7 (optional) specifies the fixed path name of the directory that holds
the image files. This is required only if the image address in the
database does not include the directory name.
Item 8 (optional) specifies the path substitution. An equal number of leading
letters of the path passed by the DDE parameter will be substituted. To
specify the number of characters to be replaced, add the number after a
space, for example C:\AAA 9
Item 9 specifies the opening state of the parent (MDI) window:
blank or 0 = normal, full screen size
1 = minimized
2 = maximized
3 = Fit-to-image, upper-left corner
x=nnnn y=nnnn will offset the window from the left and the top
by the nnnn values, e.g x=1440 y = 720 will place
the window 1 inch from the left and 0.5 inches from the
top. The window is sized to fit the image.
x=right y=bottom will place the window at the absolute right and/or bottom of
the screen.
Item 10 specifies the width of the image display window. If the value is 2,
the window opens maximized, otherwise, if the value is 100 or less,
the entry represents a percentage of the screen width. If more than 100
it represents the measurement in twips (1440 twips = 1 inch; 576 twips = 1 cm).
Item 11 is the height of the image display window. If the value is 100 or less,
the entry represents a percentage of the available screen height, otherwise
it is measured in twips (1440 twips = 1 inch; 576 twips = 1 cm).
item 12 represents the list of magnification ratios that you want to see in the
Magnification menu, for example 25,50,100,150,200,300
Item 13 represents other options:
nosave = the Save As option in the image windows is suppressed
printall = the default is set to print ALL pages.
If you use several options, separate the options with a comma or a space.
Item 14 specifies the left and top margin for the purpose of printing (inches or
centimeters depending on the Windows setup)
In the database application, you must create a script or a function for a
DDE POKE. Use the following specifications:
Application = Docview
Topic = Linkform
Item = Linkbox
EXAMPLE OF A CODE IN THE MS ACCESS APPLICATION:
-----------------------------------------------
Sub TheButton_Click() 'executed when the user clicks on the TheButton.
Dim Chan as integer
Dim x as integer
Dim param as string
On error resume next
param = [TheField]
Chan = DDEInitiate("Docview","Linkform") ' Establish a DDE link
if err <> 0 then ' if DocView is not yet running .....
x = shell("C:\docview\docview.exe " & param,3) 'start up Docview. (Space after 'exe'!)
else
DDEPoke Chan, "Linkbox", param 'Poke the data to DocView
DDETerminateAll 'Close the DDE link
endif
End Sub
(Where param represents the parameter sent to DocView.)
EXAMPLE OF A CODE IN AN VISUAL BASIC APPLICATION
------------------------------------------------
Sub Command1_Click ()
On Error Resume Next
ddelink.LinkMode = 0
ddelink.LinkTopic = "Docview|Linkform"
ddelink.LinkItem = "Linkbox"
ddelink.LinkMode = 2
If Err = 282 Then
dummy = Shell("c:\docview\install\docview.exe ddddddd", 1)
else
ddelink.Caption = ddddddd
ddelink.LinkPoke
ddelink.LinkMode = 0
endif
End Sub
(Where ddddddd represents the parameter sent to DocView.)
The database application will send (poke) the following data string to DocView:
ffffffff,ttttttttt
ffffffff,ttttttttt
ffffffff,ttttttttt
where fffffff is the file name (with path and extension), and
ttttttt is the optional title (description) of the image.
The title, if used, will be displayed in the title bar of the image.
Up to 30 items can be listed.
Please refer to the database application's user guide for the DDE syntax.
Sending data from DocView to the database application
-----------------------------------------------------
When the user clicks on the Edit button (pencil) or the Query button (question
marks) in the toolbar of DocView, DocView pokes the file name of the currently
displayed image to the database application. The information is sent to the
form and field specified in the setup (items 1,2 and 4,5, see above).
In the database application, you need to write the appropriate code to handle
the poked data.
(VB Programmers please note: The 'receiving' form must have the linkmode set
to 1 and the linktopic must agree with the topic specified in the setup.)
For support, contact Informatik Inc. at 610.640.0339 or support@informatik.com.
****************************************************************
****************************************************************
(If you use the DDE method, ignore the following section.)
THE 'SENDKEYS METHOD'
*********************
**************************************************************************
Method B (using SendKeys function)
----------------------------------
C:\ACCESS\MSACCESS.EXE C:\DBDIR\MYDB.MDB
Microsoft Access
%(FU)DVMACRO1{ENTER}
C:\ACCESS\MSACCESS.EXE C:\DBDIR\MYDB.MDB
Microsoft Access
%(FU)VDMACRO2{ENTER}
D:\DOCS
7200
6000
2
Items 1-3 contain information about the external database's EDITING subsystem:
Item 1 is the path/file name of the external database application.
If you do not integrate, enter 'None'.
Item 2 is the precise name of the external database application as
shown in its title bar. If you don not integrate, enter 'None'.
Item 3 represents the 'SendKeys' string for activating the external
database application (more information below).
Items 4-6 contain information about the external database's QUERY subsystem:
Item 4 is the path/file name of the external database application.
If you do not integrate, enter 'None'.
Item 5 is the precise name of the external database application as
shown in its title bar. If you don not integrate, enter 'None'.
Item 6 represents the 'SendKeys' string for activating the external
database application (more information below).
Item 7 (optional) specifies the fixed path name of the directory that holds
the image files. This is required only if the image address in the
database does not include the directory name.
Item 8 is the width of the image display window. If the value is 100 or less,
the entry represents a percentage of the screen width, otherwise it is
measured in twips (1440 twips = 1 inch; 576 twips = 1 cm).
Item 9 is the height of the image display window. If the value is 100 or less,
the entry represents a percentage of the available screen height, otherwise
it is measured in twips (1440 twips = 1 inch; 576 twips = 1 cm).
Item 10 specifies the window status:
blank or 0 = normal
2 = maximized
1 = minimized
**************************************************************************
The characters are not case sensitive, except possibly item 3 and item 6.
Items 1 and 2 and items 4 and 5 may (but need not necessarily) be identical.
In the database application, you must create a 'SendKeys' script or function.
If you use the 'SendKeys' link method, read and follow the instructions below:
In the external database application, you must create a script/macro that copies
the following data to the Windows clipboard, activates DocView and send
the F12 keystroke to DocView.
#F#xxxxxxxx.xxx,tttttttttt
xxxxxxxx.xxx,tttttttttt
xxxxxxxx.xxx,tttttttttt
Where #F# is a fixed starter tag,
xxxxxxxxxx.xxx is the file name of the image.
The directory path must be included unless it is declared
in the third box of the SETUP (see above).
tttttttttt is the optional description of the file that will be used in the
image displays title bar. If the tttttttttt is blank, the system
uses the file name as a description. If the tttttttttt is not used,
the comma can be omitted.
Normally, you will only have one line, one file. If you specify multiple lines,
the DocView program can display all the listed images in sequence by pressing
a 'Next' button.
As an example, a macro in Access 2.0 that sends the following keysstrokes
(SendKeys) will activates DocView:
^({ESC})<{Enter}{F12}
When the DocView user requests the external application's EDIT Form, DocView
copies a #E#xxxxxxxx.xxx string to the Windows clipboard, starts up or activates
the external application specified in items 1 and 2 and send the keystrokes
specified in item 3 of the setup specification to the external edit application. The
xxxxxxxx.xxx parameter represents the path/file name of the currently active
image in DocView. If item 7 of the SETUP specifies a global directory path,
the matching path is removed from the parameter. The #E# is an identifier flag.
The SendKeys keystrokes would normally include the commands for executing a
macro in the external database application that will pick up the image file name
in the Windows Clipboard and process it.
When the DocView user requests the external application's QUERY Form, DocView
copies a #Q#xxxxxxxx.xxx string to the Windows clipboard, starts up or activates
the external application specified in items 4 and 5 and send the keystrokes
specified in item 6 of the setup specification file to the external edit application. The
xxxxxxxx.xxx parameter represents the path/file name of the currently active
image in DocView. If item 7 of the setup specifies a global directory path,
the matching path is removed from the parameter. The #E# is an identifier flag.
The SendKeys keystrokes would normally include the commands for executing a
macro in the external database application that will pick up the image file name
in the Windows Clipboard and process it.
SendKeys
In the example above, the %(FU)VDMACRO1{ENTER} has the following meaning:
After opening the external application, the system sends the F and U keystrokes,
both while pressing the Alt key (as symbolized by the percent sign). The F open
the File menu and the U opens the Macro Request. The letters V D M A C R O 1 are
sent followed by the Enter key. VDMACRO1 is the assumed macro name (it can of course
be any name). For more details on the SendKeys syntax, please consult the application's
documentation, or contact Informatik Inc.
*************************************************************************************
For support, contact Informatik Inc. at 610.640.0339 or support@informatik.com.